﻿Public Class Form1

    Private Sub Form1_Activated(sender As Object, e As EventArgs) Handles Me.Activated
        Dim Customers As New localhost.wsCustomers
        DataGridView1.DataSource = Customers.GetListado
    End Sub

    Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
        Dim Customers As New localhost.wsCustomers
        DataGridView1.DataSource = Customers.GetListadoBusqueda(TextBox1.Text)
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim guardar As New Form2
        guardar.ShowDialog()
    End Sub

    Private Sub DataGridView1_DoubleClick(sender As Object, e As EventArgs) Handles DataGridView1.DoubleClick
        Dim CustomerID As String
        CustomerID = DataGridView1.CurrentRow.Cells(0).Value
        Dim editar As New Form2
        editar.CustomerID = CustomerID
        editar.Modo = 3
        editar.ShowDialog()
    End Sub

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub
End Class
